<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%
String path = request.getContextPath();
%>
<%@ page contentType="text/html;charset=UTF-8" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-bean" prefix="bean" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-html" prefix="html" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-logic" prefix="logic" %>
<html:html locale="true">
<head>
    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="cache-control" content="no-cache">
    <meta http-equiv="expires" content="0">
<title></title>
<link href="console.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.style1 {font-size: 16px}
-->
.even {
	background:	#eee;
}

.odd {

}
</style>
<link href="../console.css" rel="stylesheet" type="text/css">
</head>

<body>
<jsp:include page="/title.jsp" flush="true"/>

	<p class="lnkhead2"><bean:message key="menu.orgManagers"/>&gt;<bean:write name="domain"  filter="true"/></p>
	<form name="form" method="post" action="org.do">
	<input type="hidden" name ="act"/>
	   <input type="hidden" name ="domain" value="<bean:write name='domain'/>"/>
	<table width="779" >
	  <!--DWLayoutTable-->
	  <tr class="txtnormal2">
	    <td width="170" height="15" align="right" >&nbsp;</td>
	    <td colspan="2">&nbsp;</td>
	    <td width="169">&nbsp;</td>
	    <td width="67">&nbsp;</td>
	  </tr>
	  <tr class="txtnormal2">
	  <td  height="25" align="right" ><bean:message key="menu.orgManager"/>Id</td>
	  <td colspan="2" >
  	    <html:text name="config" property="id" maxlength="36"/>  	    <input type="hidden" name="domain" value='<bean:write name="config" property="id"/>'></td>
	  <td>&nbsp;</td>
	  <td>&nbsp;</td>
	  </tr>
	<tr class="txtnormal2">
	  <td height="28" align="right" ><bean:message key="org.isReadyOnly"/></td>
	  <td colspan="2" >
	    <html:select name="config" size="1" property="readonly" > 
	     <logic:equal name="config"  property="readonly" value="true">
	    <option value="true" selected>Yes</option>
	    <option value="false">No</option>
	    </logic:equal>
	    <logic:equal name="config"  property="readonly" value="false">
	    <option value="true">Yes</option>
	    <option value="false" selected>No</option>
	    </logic:equal>
	    </html:select>
	   
	  <td>&nbsp;</td>
	  <td>&nbsp;</td>
	</tr>
	<tr class="txtnormal2">
	  <td height="25" align="right" ><bean:message key="org.implClass"/></td>
	  <td colspan="2">
       <html:text name="config" property="imply_class" size="36" maxlength="80"/> </td>
	  <td>&nbsp;</td>
	  <td>&nbsp;</td>
	</tr>
	<tr class="txtnormal2">
	  <td height="25" align="right" ><bean:message key="menu.dataConnection"/></td>
	  <td colspan="2" >
        <html:select name="config" size="1" property="database" > 
        <option value=""></option>
<html:options name="databaselist"/> 
                </html:select></td>
	  <td><bean:message key="org.databaseNote"/></td>
	  <td>&nbsp;</td>
	</tr>
	<tr class="txtnormal2">
	  <td width="87" height="43">&nbsp;</td> 
	  <td width="56" align="right" valign="middle"><input  type="button" name="Submit" value="<bean:message key="button.update"/>" onclick="javascript:submit1()"></td>
	  <td width="68" align="center" valign="middle"><input type="reset" name="Submit2" value="<bean:message key="button.reset"/>"></td>
	  <td align="left" valign="middle"><input type="button" name="Submit3" value="<bean:message key="button.delete"/>" onclick="javascript:del()"></td>
	  <td></td>
	</tr>
			<tr>
	  <td height="10"></td>
	  <td></td>
	  <td> </td>
	  <td></td>
	  <td></td>
	</tr>
	<tr>
<logic:equal name="readonly" value="false">
	<table width="100%" border="0" cellpadding="0"  cellspacing="0">
					
		<tr  class="txtnormal2">			

			<td><bean:message key="org.type"/>Id:
				
				<input type="text" name="groupTypeId"  size="16"/>
				
			</td>
				<td><bean:message key="org.typeName"/>:
				
				<input type="text" name="groupTypeName"   size="16"/>
				
			</td>
			
			<td>
			<input type="button" name="Submit3" value="<bean:message key="button.add"/>" onclick="javascript:addGroupType()">
			</td>
				<td width="20%"/></td>
			
	</tr>
				
</table>
</logic:equal>
<table >
		<form name="form1" enctype="multipart/form-data" method="post" action="org.do">
			<tr>
	  <td height="10"></td>
	  <td></td>
	  <td> </td>
	  <td></td>
	  <td></td>
	</tr>
	<tr>
	  <td height="10"></td>
	  <td><input type="button" name="download_button" value="<bean:message key="org.export"/>" onclick="javascript:download()"></td>
	  <td> </td>
	  <logic:equal name="readonly" value="false">
	  <td><input  type="button" name="upload_Submit" value="<bean:message key="org.import"/>" onclick="javascript:upload()"></td>
	  <td><input type="file" name="file"></td></logic:equal>
	  <input type="hidden" name ="act"/>
	   <input type="hidden" name ="domain" value="<bean:write name='domain'/>"/>
	</tr>
		<tr>
	  <td height="10"></td>
	  <td></td>
	  <td> </td>
	  <td></td>
	  <td></td>
	</tr>
	</table>
<script  language="JavaScript">	 
	 function addGroupType()
	{
	var frm = document.forms["form"];
	if(checkId(frm.elements["groupTypeId"],"<bean:message key="org.type"/>ID")==false)
		{ 
		return;
		}
		if(frm.elements["groupTypeId"].value=="user")
		{ alert("<bean:message key="org.userType"/>");
		return;
		}
	if(frm.elements["groupTypeName"].value=="")
	{ alert("<bean:message key='org.needGroupTypeName'/>");
		return;
	}
	frm.elements["act"].value="addGroupType";
	frm.elements["id"].value=frm.elements["groupTypeId"].value;
	frm.submit();
	};
	
	</script>

</tr>
	<tr>
	  <td height="55"><img src="../images/spacer.gif" alt="" width="89" height="1"></td>
	  <td></td>
	  <td></td>
	  <td><img src="../images/spacer.gif" alt="" width="69" height="1"></td>
	  <td></td>
	</tr>
    </table>
    	<input type="hidden" name="act"/>
	</form>
	
	<logic:notEmpty name="returnMsg">
	<script>
	
	parent.frames[0].location.reload();
	alert('<bean:write name="returnMsg"/>');
	</script>
	</logic:notEmpty>
	
	<script  language="JavaScript">
	 function submit1(){
	var frm = document.forms["form"];
	if(checkId(frm.elements["id"],"<bean:message key="org.group"/>ID")==false)
	//if(frm.elements["id"].value=="")
		{ 
		//alert("×éÖ¯ID²»ÄÜÎª¿Õ£¡");
		return;
		}
		frm.elements["act"].value="update";
	frm.submit();
	 }
	  function download(){
	var frm = document.forms["form"];
		frm.elements["act"].value="download";
	frm.submit();
	 }
	  function upload(){
	var frm = document.forms["form1"];
	if(frm.elements["file"].value==""){
	alert("<bean:message key="button.mustSelectFile"/>");
	return;
	}
	frm.elements["act"].value="upload";
	frm.submit();
	}
	 function del(){
	 if( !confirm("<bean:message key='button.confirmDelete'/>")) return;
	var frm = document.forms["form"];
	frm.elements["act"].value="delete";
	frm.submit();
	 }
	</script>
<%@ include file="/bottom.jsp" %>
</body>
</html:html>



